package com.yingxue.demo.constant;

/**
 * @Package: com.company.scaffold.constant
 * @Author: Mr.Waves
 * @Date: 2020-03-17 07:27
 * @Description:
 **/
public interface Constant {
    /*
     * JWT中账号用户名对应的key
     */
    String JWT_USER_NAME_KEY = "jwt-user-name-key";

    /*
     * JWT中账号权限数组对应的key
     */
    String JWT_PERMISSIONS_KEY = "jwt-permissions-key";

    /*
     * JWT中账号角色数组对应的key
     */
    String JWT_ROLES_KEY = "jwt-roles-key";

    /*
     * 账号主动登出时，其访问凭证(accessToken)会被加入黑名单
     */
    String JWT_ACCESS_TOKEN_BLACKLIST = "jwt-access-token-blacklist_";

    /*
     * 账号主动登出时，其刷新凭证(refreshToken)会被加入黑名单
     */
    String JWT_REFRESH_TOKEN_BLACKLIST = "jwt-refresh-token-blacklist_";

    /*
     * 访问凭证在请求头(request header)中对应的key
     */
    String ACCESS_TOKEN = "authorization";

    /*
     * 刷新凭证在请求头(request header)中对应的key
     */
    String REFRESH_TOKEN = "refresh_token";

    /*
     * 标记账号是否已经被锁定
     */
    String ACCOUNT_LOCKED_KEY = "account-locked-key_";

    /*
     * 标记账号是否已经被删除
     */
    String ACCOUNT_DELETED_KEY = "account-deleted-key_";

    /*
     * 标记账号的访问凭证(accessToken)是否需要主动刷新
     */
    String JWT_REFRESH_KEY = "jwt-refresh-key_";

    /*
     * 标记账号是否已经刷新过访问凭证
     */
    String JWT_REFRESH_IDENTIFICATION = "jwt-refresh-identification_";
}
